package com.sooth.micro.camunda.service;

import com.dream.system.config.Page;
import com.sooth.common.core.exception.ServiceException;
import com.sooth.micro.camunda.view.ProcessDefinitionDto;
import org.camunda.bpm.engine.history.HistoricActivityInstance;
import org.camunda.bpm.engine.history.HistoricProcessInstance;
import org.camunda.bpm.engine.repository.Deployment;
import org.camunda.bpm.engine.repository.ProcessDefinition;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.model.bpmn.BpmnModelInstance;
import org.camunda.bpm.model.bpmn.instance.FlowElement;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import static com.sooth.micro.camunda.service.ICamundaApiService.CAMUNDA_BPM_DATASOURCE;


@ConditionalOnMissingBean(name = CAMUNDA_BPM_DATASOURCE)
@Service
public class WarningCamundaApiService implements ICamundaApiService {

    @Override
    public Deployment deploy(String processId, String processName, String processJson, String versionTag) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Page<ProcessDefinition> processDefinitionList(ProcessDefinitionDto processDefinitionDto, Page page) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public List<ProcessDefinition> processDefinitionListByKey(String processDefinitionKey) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void suspendProcessDefinitionById(String processDefinitionId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void activateProcessDefinitionById(String processDefinitionId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void start(String processDefinitionId, Map<String, Object> formData) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void approve(String taskId, Map<String, Object> formData, String userId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void reject(String taskId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void delegate(String taskId, String userId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void resolveTask(String taskId, Map<String, Object> formData) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void revoke(String taskId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void transfer(String taskId, String userId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Page todoList(List<String> candidateList, String taskName, Date startDate, Date endDate, Page page) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Page todoneList(String userId, String taskName, Date startDate, Date endDate, Page page) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Page applyList(String userId, String processName, Date startDate, Date endDate, Page page) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public BpmnModelInstance bpmnModelInstance(String processDefinitionId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public ProcessDefinition processDefinition(String processDefinitionId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public HistoricProcessInstance historicProcessInstance(String processInstanceId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Task task(String taskId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public FlowElement flowElement(String processDefinitionId, String nodeKey) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Map<String, Object> formData(String processInstanceId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Object getVariable(String processInstanceId, String variableName) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public void deleteDeployment(String deploymentId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public Deployment deployment(String deploymentId) {
        throw new ServiceException("工作流未开启");
    }

    @Override
    public List<HistoricActivityInstance> historicActivityInstanceList(String processInstanceId) {
        throw new ServiceException("工作流未开启");
    }
}
